﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TermMenu.ascx.cs" Inherits="Com.Ompchina.Web.UIControl.TermMenu" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Import Namespace="Model.Config" %>
<div id="menu" class="fl">
    <div id="menu-top" class="clearfix"><h2><%= ParentTerm.TermName %></h2></div>
    <div id="menu-center" class="clearfix">
        <ul>
            <%
                IList<TermInfo> list = this._GetTerm();
                StringBuilder repo = new StringBuilder();
                int i = 0;
                foreach (TermInfo info in list)
                {
                    if (++i == list.Count) 
                        repo.AppendFormat("<li class='last'><a href='list.aspx?tid={0}'>{1}</a></li>", info.TermID, info.TermName);
                    else
                        repo.AppendFormat("<li><a href='list.aspx?tid={0}'>{1}</a></li>", info.TermID, info.TermName);             
                }
                Response.Write(repo.ToString());
            %>
        </ul>
    </div>
    <div><img alt="" src="clients/images/bg-menu_05.gif" /></div>
</div>